<?php

namespace App\Http\Controllers;

use App\CountryModel;
use App\Http\Controllers\Controller;
use App\LanguageModel;
use App\MovieModel;
use App\TypeModel;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function index(Request $request)
    {
       $movies = MovieModel::get();
       $count=MovieModel::count();
       return view("user.index2",compact("movies","count"));
    }

    public function play(Request $request)
    {
        $id=$request->input("id");
        $movie=MovieModel::where("id",$id)->first();
        return view("user.play",compact("movie"));
    }

}
